<?php
/**
 * Description of labeledFormItem
 *
 * @author Admin
 */
abstract class labeledFormItem extends formItem{
    protected $label;
    protected $name;
    protected function __construct($name, $label = NULL) 
    {        
        $this->name = $name;  
        $this->label = $label;
    }
    public function __toString() {
        if(isset($this->label))
                return sprintf("<label for=\"%s\">%s</label>",
                $this->name,
                $this->label);
        
    }
}

?>
